Factorisation of Algebraic expressions